package com.jo.test;

import com.jo.anotation.MyAutoWire;
import com.jo.anotation.MyComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Jo on 2017/8/22.
 */
@Service("userService")
@MyComponent("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    @MyAutoWire
    private User user;

    @Override
    public void sayIocHello() {
        System.out.println(user.getName() + " say hello");
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}
